﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using CommunitySystem.JuZhuanAnZhiService;

namespace CommunitySystem
{
    public partial class JuZhuanAnZhiJiHuaDateWindow : ChildWindow
    {
        public DateTime? Dt = null;
        public JuZhuanAnZhiJiHuaDateWindow()
        {
            InitializeComponent();
        }

        private void CancelButton_Click(object sender, RoutedEventArgs e)
        {
            this.DialogResult = false;
        }

        private void OKButton_Click(object sender, RoutedEventArgs e)
        {
            if (string.IsNullOrEmpty(riqi.Text) || Convert.ToDateTime(riqi.Text) == Convert.ToDateTime("1900-01-01"))
            {
                SilverlightMessageBoxLibrary.Message.ErrorMessage("请填写安置日期！");
                return;
            }
            Dt = Convert.ToDateTime(riqi.Text);
            this.DialogResult = true;
        }
    }
}
